#ifndef VNAV_POLYGON_H
#define VNAV_POLYGON_H

#include "definitions/VNTypeDefs.h"
#include <vector>

namespace vnav
{
	namespace geometry
	{
		template<typename T> class Polygon
		{
		public:
			Polygon();
			virtual ~Polygon();
			virtual VNFloat getArea() = 0;
			virtual vnav::PolygonType getPolygonType() = 0;
			void setCenter(Position center);
			Position getCenter() const;
			const std::vector <T>& getVertices();
			void addVertex(const T& value);
		protected:
			Position m_center;
			std::vector<T> m_vertices;
		private:
		};

		template <typename T>
		Polygon<T>::Polygon()
		{
		}

		template <typename T>
		Polygon<T>::~Polygon()
		{
		}

		template <typename T>
		void Polygon<T>::setCenter(Position center)
		{
			m_center = center;
		}

		template <typename T>
		Position Polygon<T>::getCenter() const
		{
			return m_center;
		}

		template<typename T> 
		const std::vector<T> & Polygon<T>::getVertices()
		{
			return m_vertices;
		}

		template<typename T> 
		void Polygon<T>::addVertex(const T& value)
		{
			m_vertices.push_back(value);
		}
	}
}

#endif